package com.oa.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.oa.server.entity.Admin;
import com.oa.server.entity.Menu;
import com.oa.server.entity.Role;
import com.oa.server.result.ResponseBean;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author mcy
 * @since 2021-06-01
 */
public interface IAdminService extends IService<Admin> {

    ResponseBean login(String username, String password, String code, HttpServletRequest request);

    Admin getAdminByUsername(String username);

    /**
     * 根据用户id查询角色列表
     * @param adminId
     * @return
     */
    List<Role> getRolesByAdminId(Integer adminId);

    List<Admin> getAllAdmins(String keyWord);

    ResponseBean updateAdminRole(Integer adminId, Integer[] rids);

}
